/**
 * Copyright (c) 2011 Tomi Paananen.
 *
 * Part of Quick Gestures test tool.
 */

#ifndef STATISTICS_H
#define STATISTICS_H

// Qt includes
#include <QList>
#include <QMap>
#include <QString>


class CellData
{
public:
    CellData() : m_difference(-1), m_index(-1) {}
    CellData(int difference, int index) : m_difference(difference), m_index(index) {}

public: // Data
    int m_difference;
    int m_index;
};


class Statistics
{
public:
    Statistics();
    ~Statistics();

public:
    bool addValue(const QString &testSetId, int sampleGestureIndex,
                  int recognizedIndex, int difference);
    void clear();
    void setMetaData(QString metaData);
    bool exportAsHTML(const QString &filePath);

private: // Data
    QMap<QString, QList<CellData*> > m_statisticsMap;
    QString m_metaData;
    int m_maxLength;
};

#endif // STATISTICS_H
